//
//  UserAccountViewModel.h
//  weibo
//
//  Created by qiuming on 15/12/24.
//  Copyright © 2015年 qiuming. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "UserAccountModel.h"

@interface UserAccountViewModel : NSObject
/// 用户帐户模型
@property (strong, nonatomic, readonly) UserAccountModel *userAccount;
/// 是否登录
@property (assign, nonatomic, readonly) BOOL isLogin;
/// 用户头像地址
@property (assign, nonatomic, readonly) NSURL *avatarUrl;
// 用户帐户单例
+ (instancetype)sharedUserAccount;

/// 发起网络请求通过code获取Token
///
/// @param code      code
/// @param completed 完成时回调
- (void)accessTokenWithCode:(NSString *)code completed:(void(^)(BOOL isSuccessed))completed;

@end
